from kafka import KafkaConsumer

# producer = KafkaProducer(bootstrap_servers='niit01:9092')
consumer = KafkaConsumer(
#    bootstrap_servers = "域名:port", # kafka集群地址
    auto_offset_reset='earliest',
    bootstrap_servers = "niit01:9092",
    group_id = "niit",
    )
consumer.subscribe(["result"])
for msg in consumer:
    print((msg.value).decode('utf8'))

